/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.store.hbase.hbaseop;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;

/**
 *
 * @author work
 */
public class HbaseConf {

    private static Configuration configuration;

    public static Configuration getHbaseConf(String rootdir, String isDistributed, String master,
            String zkquorum, String zkDataDir,
            String zksessionTimeout, String rpcTimeout, String handlerCount,
            String cacheSize, String size) {

        configuration = HBaseConfiguration.create();
        configuration.set("hbase.rootdir", rootdir);
        configuration.set("hbase.cluster.distributed", isDistributed);
        configuration.set("hbase.master", master);
        configuration.set("hbase.zookeeper.quorum", zkquorum);
        configuration.set("hbase.zookeeper.property.dataDir", zkDataDir);
        configuration.set("zookeeper.session.timeout", zksessionTimeout);
        configuration.set("hbase.rpc.timeout", handlerCount);
        configuration.set("hbase.regionserver.handler.count", handlerCount);
        configuration.set("hfile.block.cache.size", cacheSize);
        configuration.set("hbase.regionserver.global.memstore.size", size);

        return configuration;
    }
}

/*
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 configuration.set("hbase.rootdir", "hdfs://node1:9000/hbase");
 configuration.set("hbase.cluster.distributed", "true");
 configuration.set("hbase.master", "node1:60000");
 configuration.set("hbase.zookeeper.quorum", "node1,node2,node3,node4,node5,node6,node7,node8,node9,node10");
 configuration.set("hbase.zookeeper.property.dataDir", "/home/weibo/hbase/zookeeper_data");
 configuration.set("zookeeper.session.timeout", "180000/");
 configuration.set("hbase.rpc.timeout", "60000");
 configuration.set("hbase.regionserver.handler.count", "20");
 configuration.set("hfile.block.cache.size", "0.1");
 configuration.set("hbase.regionserver.global.memstore.size", "0.7");
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 */
